﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;

namespace DAL
{
    public  class ProjectNumberDAL:BaseDAL<Basic_Info>
    {
        public override string TableName
        {
            get { return "Message"; }
        }

        public override Dictionary<string, bool> PkName
        {
            get
            {
                Dictionary<string, bool> dic = new Dictionary<string, bool>();
                dic.Add("ID", true);
                return dic;
            }
        }
        /// <summary>
        /// 获取目前数据库中最后的项目编号
        /// </summary>
        /// <returns></returns>
        public Basic_Info GetLastNum()
        {
            string sql = "select top(1) ProjectNumber from Basic_Info order by Basic_id desc ";
            return DBHelper.ExecuteObject<Basic_Info>(sql);
        }
    }
}
